import Vue from 'vue'
import Vuex from 'vuex'

Vue.use(Vuex)

export default new Vuex.Store({
    state: {
        flag: 0,
        user: sessionStorage.getItem('user') ? sessionStorage.getItem('user') : ''
    },
    getters: {},
    mutations: {
        setUser(state, newV) {
            state.user = newV
        }
    },
    actions: {},
    modules: {}
})